package com.orangelife.mobile.pay.biz;

import com.orangelife.mobile.pay.interfaze.IPayCallBack;

/**
 * 支付工厂类，采用工厂模式
 * @author Administrator
 *
 */
public class PayFactory {
	public <T> T produce(String type,IPayCallBack iPayCallBack) {
        T t = null;
        if ("alipay".equals(type)) {
            t = (T) new PayManageImpl(iPayCallBack);
            return t;
        } else if ("lianlian".equals(type)) {  
            return (T) new LianLianManageImpl(iPayCallBack);
        } else if ("wechat".equals(type)){
            return (T) new WeChatImpl();
        } else {
            return null;  
        }  
    }
}
